package com.xmb.common.controller.internal;

import com.xmb.common.remote.entity.OrderRewardParam;
import com.xmb.common.service.OrderRewardSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by lyndon on 2019/4/10.
 *
 * 分销奖励发放
 */
@RestController
@RequestMapping(value = "/order/reward/send")
public class OrderRewardSendController {

    @Autowired
    private OrderRewardSettingService orderRewardSettingService;

    /**
     * 增加分销奖励发放记录
     * @param
     */
    @PostMapping(value = "saveOrderRewardRecord")
    public int saveOrderRewardRecord(@RequestBody OrderRewardParam orderRewardParam){
        return orderRewardSettingService.saveOrderRewardRecord(orderRewardParam);
    }

    /**
     * 分销奖励发放
     * @param
     */
    @PostMapping(value = "sendOrderReward")
    public int sendOrderReward(@RequestBody OrderRewardParam orderRewardParam){
        return orderRewardSettingService.sendOrderReward(orderRewardParam);
    }

}
